﻿@{
    ViewBag.Title = "首页";
    Layout = "~/Views/Shared/_MobileLayout.cshtml";
    var comboList = ViewBag.ComboList as List<LPY.LeHealth.DTO.ComboDTO>;
    var singleList = ViewBag.SingleList as List<LPY.LeHealth.DTO.ComboDTO>;
}

@section Header{
    <style type="text/css">
        .combo h2 strong {
            font-size: 24px;
            font-weight: lighter;
            float: left;
            display: inline;
            border-left: 8px solid #0080cc;
            margin-top: 23px;
            padding: 0 0 0 10px;
            height: 24px;
            line-height: 24px;
            overflow: hidden;
            color: #333;
        }

        .combo h2 a {
            display: inline;
            float: right;
            margin-right: 10px;
            font-size: 16px;
            font-weight: normal;
            color: #666;
            border: 1px solid #cccccc;
            width: 70px;
            border-radius: 1000px;
            line-height: 34px;
            text-align: center;
            margin-top: 17px;
        }

        .combo h2 {
            height: 70px;
            border-bottom: 1px solid #dddddd;
            line-height: 70px;
        }
    </style>

}

<!--Banner-->
<div class="row" style="margin-top:-15px;">
    <img src="~/Asset/banner.png" class="img-responsive" />
</div>
<!--Ad-->
<div class="row" style="margin-top: 10px; background-color: #F2F5FC;">
    <div class="col-xs-6">
        <a href="#">
            <img src="~/Asset/combo_1.png" class=" img-responsive">
        </a>
    </div>
    <div class="col-xs-6">
        <a href="#">
            <img src="~/Asset/combo_2.png" class=" img-responsive">
        </a>
    </div>
</div>
<div class="row" style="background-color: #F2F5FC; ">
    <div class="col-xs-6">
        <a href="#">
            <img src="~/Asset/combo_4.png" class=" img-responsive">
        </a>
    </div>
    <div class="col-xs-6">
        <a href="#">
            <img src="~/Asset/combo_3.png" class=" img-responsive">
        </a>
    </div>
</div>
<!--体检套餐-->
<div class="row combo">
    <h2>
        <a href="@Url.Action("Combo","Mobile")">更多 &gt;</a>
        <strong>体检套餐</strong>
    </h2>
</div>

@for (int i = 0; i < comboList.Count; i++)
{
    var isEven = (i + 1) % 2 == 0;
    if (isEven)
    {
        <div class="row" style="padding-top: 10px;background-color: rgba(248,248,248,1);">
            <div class="col-xs-4">
                <a href="@Url.Action("ComboDetail", "Mobile", new { id = comboList[i].Id })">
                    <img class="img-rounded pull-left img-responsive" src="/Asset/tijian.png">
                </a>
            </div>
            <div class="col-xs-8">
                <p>
                    <strong><a title="@comboList[i].Name" href="@Url.Action("ComboDetail", "Mobile", new { id = comboList[i].Id })">@comboList[i].Name</a></strong>
                </p>
                <p>
                    <em class="fr">@comboList[i].Hospital.Area.Name</em>
                    <em class="hpname">
                        <span>@comboList[i].Hospital.Name</span>
                    </em>
                </p>
                <p class="priceinfo">
                    @*<span>销量：888</span>*@
                    <b>¥<strong>@Math.Round(comboList[i].Price)</strong></b>
                    <s>原价：¥@Math.Round(comboList[i].Price)</s>
                    <a href="@Url.Action("ComboDetail", "Mobile", new { id = comboList[i].Id })" class="btn btn-danger">去购买</a>
                </p>
            </div>
        </div>
    }
    else
    {
        <div class="row" style="padding-top: 10px;">
            <div class="col-xs-4">
                <a href="@Url.Action("ComboDetail", "Mobile", new { id = comboList[i].Id })">
                    <img class="img-rounded pull-left img-responsive" src="/Asset/tijian.png">
                </a>
            </div>
            <div class="col-xs-8">
                <p>
                    <strong><a title="@comboList[i].Name" href="@Url.Action("ComboDetail", "Mobile", new { id = comboList[i].Id })">@comboList[i].Name</a></strong>
                </p>
                <p>
                    <em class="fr">@comboList[i].Hospital.Area.Name</em>
                    <em class="hpname">
                        <span>@comboList[i].Hospital.Name</span>
                    </em>
                </p>
                <p class="priceinfo">
                    @*<span>销量：888</span>*@
                    <b>¥<strong>@Math.Round(comboList[i].Price)</strong></b>
                    <s>原价：¥@Math.Round(comboList[i].Price)</s>
                    <a href="@Url.Action("ComboDetail", "Mobile", new { id = comboList[i].Id })" class="btn btn-danger">去购买</a>
                </p>
            </div>
        </div>
    }
}


<!--单项体检-->
<div class="row combo">
    <h2>
        <a href="@Url.Action("Single","Mobile")">更多 &gt;</a>
        <strong style="border-left:8px solid #ff9000;">单项体检</strong>
    </h2>
</div>
@for (int i = 0; i < singleList.Count; i++)
{
    var isEven = (i + 1) % 2 == 0;
    if (isEven)
    {
        <div class="row" style="padding-top: 10px;background-color: rgba(248,248,248,1);">
            <div class="col-xs-4">
                <a href="@Url.Action("ComboDetail", "Mobile", new { id = singleList[i].Id })">
                    <img class="img-rounded pull-left img-responsive" src="/Asset/tijian.png">
                </a>
            </div>
            <div class="col-xs-8">
                <p>
                    <strong><a title="@singleList[i].Name" href="@Url.Action("ComboDetail", "Mobile", new { id = singleList[i].Id })">@singleList[i].Name</a></strong>
                </p>
                <p>
                    <em class="fr">@singleList[i].Hospital.Area.Name</em>
                    <em class="hpname">
                        <span>@singleList[i].Hospital.Name</span>
                    </em>
                </p>
                <p class="priceinfo">
                    @*<span>销量：888</span>*@
                    <b>¥<strong>@Math.Round(singleList[i].Price)</strong></b>
                    <s>原价：¥@Math.Round(singleList[i].Price)</s>
                    <a href="@Url.Action("ComboDetail", "Mobile", new { id = singleList[i].Id })" class="btn btn-danger">去购买</a>
                </p>
            </div>
        </div>
    }
    else
    {
        <div class="row" style="padding-top: 10px;">
            <div class="col-xs-4">
                <a href="@Url.Action("ComboDetail", "Mobile", new { id = singleList[i].Id })">
                    <img class="img-rounded pull-left img-responsive" src="/Asset/tijian.png">
                </a>
            </div>
            <div class="col-xs-8">
                <p>
                    <strong><a title="@singleList[i].Name" href="@Url.Action("ComboDetail", "Mobile", new { id = singleList[i].Id })">@singleList[i].Name</a></strong>
                </p>
                <p>
                    <em class="fr">@singleList[i].Hospital.Area.Name</em>
                    <em class="hpname">
                        <span>@singleList[i].Hospital.Name</span>
                    </em>
                </p>
                <p class="priceinfo">
                    @*<span>销量：888</span>*@
                    <b>¥<strong>@Math.Round(singleList[i].Price)</strong></b>
                    <s>原价：¥@Math.Round(singleList[i].Price)</s>
                    <a href="@Url.Action("ComboDetail", "Mobile", new { id = singleList[i].Id })" class="btn btn-danger">去购买</a>
                </p>
            </div>
        </div>
    }
}

